<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="hello">
        <fucpn></fucpn>
    </div>
    <script src="../../vue.js"></script>
    <script>
        const ziComponent = Vue.extend({
            template:`
             <div>
                <h5>这个是子组件的内容</h5>    
            </div>
            
            `,
        })

        // 包含子组件内容的叫父组件
        const fuComponent = Vue.extend({
            template:`
                <div>
                    <h5>这是父组件的内容</h5>   
                    <cpn1></cpn1> 
                </div>
            `,
            // 父组件里面声明注册一下儿子组件
            components:{
                cpn1:ziComponent,
            }
        })
        const vue01 = new Vue({
            el: '#hello',
            //声明局部组件
            components:{
                fucpn : fuComponent,
            }
        })
    </script>
</body>

</html>